﻿package org.hsl.haxe;
/**
 * The signaler-slot list bridge serves as a bridge between a signaler and a slot list. These bridges are created by the
 * slot lists and are made available to only the signaler on connection.
 * 
 * This way the callSlots method does not have to be in the ISlotList interface, which would make HSL less safe because it
 * would allow the client to dispatch signals from the slot list.
 */
interface ISignalerSlotListBridge<D> {
	/**
	 * Calls all the slots in the slot list.
	 */
	public function callSlots(signal:Signal<D>):Void;
}
/**
 * A null object implementation of the ISignalerSlotListBridge interface.
 */
class NullSignalerSlotListBridge<D> implements ISignalerSlotListBridge<D> {
	/**
	 * Creates a new null signaler-slot list bridge.
	 */
	public function new():Void {
	}
	public function callSlots(signal:Signal<D>):Void {
	}
	private function toString():String {
		return "[ISignalerSlotListBridge]";
	}
}